package org.x.casemodule.enums;

public enum EventStatus {

    //'ACTIVE','CANCELLED'
    ACTIVE("ACTIVE", "正常"),
    CANCELLED("CANCELLED", "取消");
    private String code;

    private String name;

    EventStatus(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }


    public static EventStatus getByCode(String code) {
        for (EventStatus value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
    public static EventStatus getByName(String name) {
        for (EventStatus value : values()) {
            if (value.name.equals(name)) {
                return value;
            }
        }
        return null;
    }


}
